  Note: the target for this patch is iQue & console.  Emulator use is *not* recommended.  It does not mask away iQue registers, and some emulators throw errors or crash on their access.  Use the "unQue Zelda Chiamshou Shiguang Zhi Di" patch with those instead.

.: Zelda Chiamshou Shiguang Zhi Di Combined iQue & Console Patch :.
  This patch detects if the game is played on an iQue or console and selects proper save and controller support for the device.  If played on an iQue it will save to the device as usual.  If played on a console, hardware saves and Rumble Pak support is enabled.
  For the sake of flashcarts that look at GUID codes to differentiate these patches from retail titles, a GUID and timestamp were added.  The device type is set to "B" for "BB Player" (not "Q"), and region to "C" for China or "W" for Taiwan/Hong Kong.  Internal names are encoded using codepage 936 (normally CP 932).  This information is not used by console.  Bootstraps (IPL3) are swapped to match their retail counterparts; iQue does not, in fact, run this code.  The GUID will, for better or worse, match unQue titles.

  It also applies two bugfixes.  The correct MP cost for light arrows is displayed in the menu, and if played with an expansion pak the "out of memory" bugs that plague the iQue version no longer occur.

  Important: to utilize the memory fix, iQue users need to change the RDRAM size in their ticket to 00600000.  OoT only uses 6MB at most (the original planned XPak size), but it initializes (almost) all of memory detected at boot.  If left at 4MB the memory patch won't be in effect, and set to 8MB it may overwrite your save.  You can also set the new SHA1 to 045B50E1E10C224E78AA77A038B990125E8CD2B1.
  A sample unsigned ticket is provided.

  On iQue, it's designed as a (mostly) drop-in replacement for 00200f70.app provided you either can resign the ticket or use hackit.sys to load it.  Upload the modified tickets, the .app, and run as usual.  (If the ticket is unsigned, run via hackit.)  A video of this may, with any luck, be found here:
https://youtu.be/whQKAUVsCCE
  Alternately, doubly-encrypt the standalone ROM and overload an existing encrypted title.


.: Patching :.
  Apply the xdelta patch using the similarly named xdelta; use version 3.0.8 or up.
  The "decrypted.xdelta" patch will only apply to a *decrypted* Simplified Chinese ROM in native (big-endian) byteorder.  It cannot be used with the Traditional Chinese ROM.
  Against all better judgement, a patch is also provided for the once-encrypted app version.  The "app.xdelta" patch will only apply to an *encrypted* Simplified Chinese ROM in app format.  Due to the nature of CBC encryption and diff entry overhead, the patch's size exceeds the size of the file it's patching.

  (Decrypted) Simplified Chinese Patch Name
  	decrypted.xdelta

  (Decrypted) Simplified Chinese Common Names
  	2101104
  	00200F70.z64
  	Zelda Chiamshou Shiguang Zhi Di (Simplified).z64

  (Decrypted) Simplified Chinese Original File Checksums
  SHA-1
  	1015D0F3AF34B89149BFD773580BBC66466AF54E
  SHA-512
  	6D4473730799D631E457F8BF289CABC4979560EDCFD83E549133865600D6696E6C4236272FA925AA8A40A46D5C3A7166319AC9296B005442122120402DFD2D5A

  (Decrypted) Simplified Chinese Patched File Checksums
  SHA-1
  	045B50E1E10C224E78AA77A038B990125E8CD2B1
  SHA-512
  	935F6613F7730F6C39F891153007075D9FBC2EAE83D7BBC729E46BCC2837EF07015E4B302CE20101048DE7A1B7D1C3FEBA6BE596CBA433ADF87EEC5787A7E338


  (Encrypted) Simplified Chinese Patch Name
  	app.xdelta

  (Encrypted) Simplified Chinese Common Names
  	00200f70.app

  (Encrypted) Simplified Chinese Original File Checksums
  SHA-1
  	47BAD44EB197B619FA7EB534F763267CF4437B08
  SHA-512
  	D792A1D60DB79D2F8C100168DF54081435CDD2A9319F8EFB5894C30C5B4B83451B2E3A6282E49FF722EC2117071CCA8ACC82AF55D2271B9876123BE1126F79BF

  (Encrypted) Simplified Chinese Patched File Checksums
  SHA-1
  	C898C6623E474364793040DDB7C12962DA67B6F2
  SHA-512
  	A74CDC4EEA0849EF047462893A85594A602F4ED7A7AA8134F6F199082B7033C13A0A259505DCCF8C4A225D2C9C81470CD3D030EF270F225A9B8CEA06E999B755

-Zoinkity
